#pragma once
#include <d3dx9.h>
#include "iNodeData.h"
#include "iMaxObject.h"
#include "bincontainer.h"

class iDumpMaxData;
struct _PUREGEOM;
class iExportMesh
{
public:
	iExportMesh(void);
	~iExportMesh(void);

	bool Export( iDumpMaxData* pDumpData );
	bool ExportCombineMesh();
	bool GetMeshData(_PUREGEOM& commesh, char compare1, char compare2 );
	bool GetAllMeshData( _PUREGEOM& commesh, char compare1, char compare2 );

protected:	
	void ExportItem( char* fileName, bool armItem = false );
	void ExportHair();
	void ExportFace();
	void ExportBody();	
	void ExportCloth(); 
	void ExportHand();
	void ExportCloak();
	void ExportFoot();
	void ExportWeapon();
	void ExportBone();
	void ExportWeaponBone( char* fname );
	void ExportFaceBone( char* fname );
	void ExportCharacterBone( char* fname );
	void WriteFile(char *fname, _PUREGEOM &mymesh,int kind,int part, int ver = 1 );

protected:
	iDumpMaxData* m_pDumpData;
};
